#ifndef NET_POLL_THREAD_POOL_H_
#define NET_POLL_THREAD_POOL_H_

#include "base/base.h"

#include "net/poll_thread.h"

namespace net {
class Poller;

class PollThreadPool {
  public:
    explicit PollThreadPool(Poller* base_poll);

    ~PollThreadPool() {
      StlClear(&threads_);
    }

    Poller* getPoller();

    void Start();

  private:
    int32 index_;
    std::vector<PollThread*> threads_;

    scoped_ptr<Poller> base_poll_;

    void InitThread();

    DISALLOW_COPY_AND_ASSIGN(PollThreadPool);
};

}

#endif
